Finding Level-Ancestors in Trees
نویسندگان
چکیده
The level-ancestor problem is considered. Suppose a rooted tree T is given for preprocessing. Answer quickly queries of the following form. Given a vertex v and an integer i > 0, find the ith vertex on the path from v to the root. Given any m, 1 ~<m~<log* n, we achieve the following results: (1) O(log (m) n) a time using an optimal number of processors for preprocessing and constant time using a single processor for processing a query ifm is constant. (2) O(log* n) time using an optimal number of processors for preprocessing and O(log* n) time using a single processor for processing a query, These results assume that the Euler tour of the tree and the level (distance from the root) of each vertex are given. Without these assumptions, the only change in result (1) above is that preprocessing time increases to O(logn). An immediate corollary is a serial linear-time bound for preprocessing and a constant-time bound for processing a query. © 1994 Academic Press, Inc.
منابع مشابه
Intraspecific gene genealogies: trees grafting into networks.
Intraspecific gene evolution cannot always be represented by a bifurcating tree. Rather, population genealogies are often multifurcated, descendant genes coexist with persistent ancestors and recombination events produce reticulate relationships. Whereas traditional phylogenetic methods assume bifurcating trees, several networking approaches have recently been developed to estimate intraspecifi...
متن کاملLowest Common Ancestors in Trees and Directed Acyclic Graphs1
We study the problem of finding lowest common ancestors (LCA) in trees and directed acyclic graphs (DAGs). Specifically, we extend the LCA problem to DAGs and study the LCA variants that arise in this general setting. We begin with a clear exposition of Berkman and Vishkin’s simple optimal algorithm for LCA in trees. The ideas presented are not novel theoretical contributions, but they lay the ...
متن کاملComputing Lowest Common Ancestors in Directed Acyclic Graphs
Finding the lowest common ancestor of a given pair of nodes is a fundamental algorithmic problem. In this paper we study the lowest common ancestor(LCA) problem on directed acyclic graphs (DAGs). A lowest common ancestor of two nodes a and b is a node c which is a common ancestor of a and b and no other node is both a common ancestor of a and b and a proper descendant of c. LCA on trees have be...
متن کاملSuffix Trees and Suffix Arrays
Iowa State University 1.1 Basic Definitions and Properties . . . . . . . . . . . . . . . . . . . . 1-1 1.2 Linear Time Construction Algorithms . . . . . . . . . . . . . 1-4 Suffix Trees vs. Suffix Arrays • Linear Time Construction of Suffix Trees • Linear Time Construction of Suffix Arrays • Space Issues 1.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...
متن کاملAncestryAI: A Tool for Exploring Computationally Inferred Family Trees
Many people are excited to discover their ancestors and thus decide to take up genealogy. However, the process of finding the ancestors is often very laborious since it involves comparing a large number of historical birth records and trying to manually match the people mentioned in them. We have developed AncestryAI, an open-source tool for automatically linking historical records and explorin...
متن کاملLecture 15 — April 12 , 2012
In this lecture, we look at various data structures to solve problems about static trees: given a static tree, we perform some preprocessing to construct our data structure, then use the data structure to answer queries about the tree. The three problems we look at in this lecture are range minimum queries (RMQ), lowest common ancestors (LCA), and level ancestor (LA); we will support all these ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- J. Comput. Syst. Sci.
دوره 48 شماره
صفحات -
تاریخ انتشار 1994